<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const items=[
            ["财经1", "财经2", "财经3", "财经4", "财经5"],
            ["时政1", "时政2", "时政3", "时政4", "时政5"],
            ["体育I", "体育II", "体育III", "体育IV", "体育V", "体育VI", "体育VII"]
        ];
        const weight = [2, 1, 3];

        let maxItem = (arr) => {
            let max = 0;
            let index = 0;
            arr.forEach((item,i) => {
                if(item.length > max){
                    max = item.length;
                    index = i;
                }
            });
            return {index,max};
        }
        
        let res = [];
        let k = 0;
        let get = (items) => {
            for(let i = 0; i < items.length; i++){
                let item = items[i];
                if(i > weight.length-1){
                    k = 0;
                } else {
                    k = i;
                }
                let partArr = item.splice(0,weight[k]);
                partArr.length > 0 && res.push(...partArr);
            }
            maxItem(items).max > 0 && get(items);
        }
        
        get(items);

        console.log(res)

    </script>
</body>
</html>